package ca.tatham.triplipse;

import org.openrdf.model.Resource;
import org.openrdf.model.Statement;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.impl.StatementImpl;

/**
 * This implementation of RDF Statement is backed by a RIO (openrdf.org)
 * Statement.
 * 
 * 
 * @author BenTatham
 */
public class RioRdfStatement implements RdfStatement {

	private final Statement m_statement;
	private final int m_lineNumber;

	public RioRdfStatement(Resource subject, URI predicate, Value object,
			int lineNo) {
		m_statement = new StatementImpl(subject, predicate, object);
		m_lineNumber = lineNo;
	}

	public int getLineNumber() {
		return m_lineNumber;
	}

	public Value getObject() {
		return m_statement.getObject();
	}

	public URI getPredicate() {
		return m_statement.getPredicate();
	}

	public Resource getSubject() {
		return m_statement.getSubject();
	}

	public int hashCode() {
		return m_statement.hashCode();
	}

	public boolean equals(Object other) {
		return m_statement.equals(other);
	}

	public int compareTo(Object other) {
		return m_statement.compareTo(other);
	}

}
